<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Windows窗口对象</title>
  <script>
    function show(){
      alert("打游戏了！！!")
    }

    //加载事件
    window.onload= function (){
      let div = document.getElementById("d");
      alert(div)
    }


  </script>

</head>
<body>
    <div id="d">aaaa</div>
</body>
<!--      <script>
          function show(){
            alert("打游戏了！！!")
          }

          //一次性定时器
          let d1 = window.setTimeout("show()",2000);
          //取消一次性
          window.clearTimeout(d1);


          //设置循环定时器
          let d2 = window.setInterval("show()",1000);
          //取消循环
          window.clearInterval(d2);

          //加载事件
          let div = document.getElementById("d");
          alert(div);
      </script>-->
</html>